Programming Concepts
There are a number of programming concepts that you need to be familiar with:
Variables
When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory containing a value that can be accessed or changed. Think of a variable as a box with a label that you can store information in.
Strings
In programming we usually call normal text a string. A string is a collection of alphabetic and/or numeric characters. We tell the computer something is a string by putting quotation marks around it.
Sequencing
A sequence is the simplest type of program. Sequential programs are made up of a set of instructions that must be carried out in order, one at a time. An example of a sequence is a program that takes 2 numbers, adds them together and outputs the result.

Selection
There is only one possible path through a sequential program; however, programs that use selection have two or more possible paths through them. The path that is taken depends on whether the answer to a question is 'Yes' or 'No'.

Loops
We use loops to stop us having to type the same code out many times and to make our programs more efficient. There are two main types of loop: FOR and WHILE. FOR loops are used when you know how many times you want to do something and WHILE loops are used when you don't.

Functions
When programming we often need to perform a specific task several times, at different points in the program; this is when functions come in handy. A function is a portion of code within a larger program that usually does something very specific and returns a value to the main program.


